CM=000, COINIT=0, PCS=0000, LENGTH=0, SCS=00, ONCE=0, OUTMODE=000, DIR=0
Timer Channel Control Register
OUTMODE | Output Mode 0 (000): Asserted while counter is active 1 (001): Clear OFLAG output on successful compare 2 (010): Set OFLAG output on successful compare 3 (011): Toggle OFLAG output on successful compare 4 (100): Toggle OFLAG output using alternating compare registers 5 (101): Set on compare, cleared on secondary source input edge 6 (110): Set on compare, cleared on counter rollover 7 (111): Enable gated clock output while counter is active |
COINIT | Co-Channel Initialization 0 (0): Co-channel counter/timers cannot force a re-initialization of this counter/timer 1 (1): Co-channel counter/timers may force a re-initialization of this counter/timer |
DIR | Count Direction 0 (0): Count up. 1 (1): Count down. |
LENGTH | Count Length 0 (0): Count until roll over at $FFFF and continue from $0000. 1 (1): Count until compare, then re-initialize. If counting up, a successful compare occurs when the counter reaches a COMP1 value. If counting down, a successful compare occurs when the counter reaches a COMP2 value. When output mode $4 is used, alternating values of COMP1 and COMP2 are used to generate successful comparisons. For example, the counter counts until a COMP1 value is reached, re-initializes, counts until COMP2 value is reached, re-initializes, counts until COMP1 value is reached, and so on. |
ONCE | Count Once 0 (0): Count repeatedly. 1 (1): Count until compare and then stop. If counting up, a successful compare occurs when the counter reaches a COMP1 value. If counting down, a successful compare occurs when the counter reaches a COMP2 value. When output mode $4 is used, the counter re-initializes after reaching the COMP1 value, continues to count to the COMP2 value, and then stops. |
SCS | Secondary Count Source 0 (00): Counter 0 input pin 1 (01): Counter 1 input pin 2 (10): Counter 2 input pin 3 (11): Counter 3 input pin |
PCS | Primary Count Source 0 (0000): Counter 0 input pin 1 (0001): Counter 1 input pin 2 (0010): Counter 2 input pin 3 (0011): Counter 3 input pin 4 (0100): Counter 0 output 5 (0101): Counter 1 output 6 (0110): Counter 2 output 7 (0111): Counter 3 output 8 (1000): IP bus clock divide by 1 prescaler 9 (1001): IP bus clock divide by 2 prescaler 10 (1010): IP bus clock divide by 4 prescaler 11 (1011): IP bus clock divide by 8 prescaler 12 (1100): IP bus clock divide by 16 prescaler 13 (1101): IP bus clock divide by 32 prescaler 14 (1110): IP bus clock divide by 64 prescaler 15 (1111): IP bus clock divide by 128 prescaler |
CM | Count Mode 0 (000): No operation 1 (001): Count rising edges of primary sourceRising edges are counted only when SCTRL[IPS] = 0. Falling edges are counted when SCTRL[IPS] = 1. If the primary count source is IP bus clock divide by 1, only rising edges are counted regardless of the value of SCTRL[IPS]. 2 (010): Count rising and falling edges of primary sourceIP bus clock divide by 1 cannot be used as a primary count source in edge count mode. 3 (011): Count rising edges of primary source while secondary input high active 4 (100): Quadrature count mode, uses primary and secondary sources 5 (101): Count rising edges of primary source; secondary source specifies directionRising edges are counted only when SCTRL[IPS] = 0. Falling edges are counted when SCTRL[IPS] = 1. 6 (110): Edge of secondary source triggers primary count until compare 7 (111): Cascaded counter mode (up/down)The primary count source must be set to one of the counter outputs. |